<%@ page import="com.littleken.code.CaptcahCode" %><%--
  Created by IntelliJ IDEA.
  User: littleken
  Date: 2018/5/24
  Time: 13:59
  通过调用本jsp产生验证码
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
    //清空浏览器缓存
    response.setHeader("pragma","no-cache");
    response.setHeader("cache-control","no-cache");
    response.setHeader("expires","0");

    //调用验证码生成工具类
    /*String code = CaptcahCode.drawImage(response);*/
    String code = CaptcahCode.drawImageVerificate(response);
    session.setAttribute("code",code);

    out.clear();
    out = pageContext.pushBody();
%>

